﻿Public Class Inf_PoblacionRegistradaXedadxSexo
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub
    Private Sub TraeDatosDEsexoMAsculino()
        Dim Rs As ADODB.Recordset
        Dim param(0) As ADODB.Parameter

        'seteo el control 
        Chart_M.DataBind()


        param(0) = New ADODB.Parameter
        param(0).Name = "@Sexo"
        param(0).Type = ADODB.DataTypeEnum.adVarChar
        param(0).Direction = ADODB.ParameterDirectionEnum.adParamInput
        param(0).Value = "M"
        param(0).Size = 1


        Rs = Datos.TraerTodos("INforme_poblacionConocidaXsexo", param, "TraeDatosDEsexoMAsculino-Inf_poblacion")

        If Rs.RecordCount = 0 Then
            Exit Sub
        End If

        lbltitulo.Visible = True

        FG.CargaControlChart_asp(Rs, Chart_M, "Escala de sexo masculino", DataVisualization.Charting.SeriesChartType.Area, True, DataVisualization.Charting.AreaAlignmentOrientations.Vertical, Drawing.Color.Blue, , "Porcentajes", 500, 500, 100, True, 50, 60, 0, 30)



    End Sub
    Private Sub TraeDatosDEsexoFemenino()
        Dim Rs As ADODB.Recordset
        Dim param(0) As ADODB.Parameter

        'seteo el control 
        Chart_F.DataBind()


        param(0) = New ADODB.Parameter
        param(0).Name = "@Sexo"
        param(0).Type = ADODB.DataTypeEnum.adVarChar
        param(0).Direction = ADODB.ParameterDirectionEnum.adParamInput
        param(0).Value = "F"
        param(0).Size = 1


        Rs = Datos.TraerTodos("INforme_poblacionConocidaXsexo", param, "TraeDatosDEsexoMAsculino-Inf_poblacion")

        If Rs.RecordCount = 0 Then
            Exit Sub
        End If

        lbltitulo.Visible = True

        FG.CargaControlChart_asp(Rs, Chart_F, "Escala de sexo femenino", DataVisualization.Charting.SeriesChartType.Area, True, DataVisualization.Charting.AreaAlignmentOrientations.Vertical, Drawing.Color.Red, , "Porcentajes", 500, 500, 100, True, , , , 30)



    End Sub

    Protected Sub btnAnioGraf_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAnioGraf.Click

        lblMsje.Visible = False
        lbltitulo.Visible = False

        TraeDatosDEsexoFemenino()
        TraeDatosDEsexoMAsculino()
    End Sub
End Class